package com.ws.game.lesson6
{
	import com.ws.game.common.framework.BaseGameObject;
	import com.ws.game.common.framework.BaseGameScene;
	import com.ws.game.common.utils.MapType;
	import com.ws.game.common.utils.PartType;
	import com.ws.game.common.global.Global;
	import com.ws.game.skins.MonsterSkin;
	import com.ws.game.skins.PlayerSkin;
	import com.ws.game.skins.StoneSkin;
	import com.ws.game.skins.BasicSkin;
	import com.ws.game.lesson3.fire.Player;
	import com.ws.game.lesson3.fire.Monster;
	import com.ws.game.lesson3.fire.KeyBoardCtrl;
	import com.ws.game.lesson3.fire.MonsterCtrl;
	import com.ws.game.lesson4.basic.Basic;
	import com.ws.game.lesson4.basic.BasicCtrl;
	import com.ws.game.lesson5.map.MapScen;
	import com.ws.game.lesson5.map.Stone;
	
	import flash.display.Stage;
	
	public class L6MapScen extends MapScen
	{
		public function L6MapScen(_stage:Stage)
		{
			super(_stage);
		}
		
		override protected function getObjById(id:uint):BaseGameObject
		{
			var result:BaseGameObject=null;
			switch(id)
			{
				case MapType.STONE:
					result = new Stone(new StoneSkin());
					break;
				case MapType.MONSTER:
					result = new Monster(new MonsterCtrl(), new MonsterSkin());
					break;
				case MapType.PLAYER:
					result = new Action8Object(new Key8Ctrl(), new PlayerSkin());
					break;
				case MapType.BASE:	
					result = new Basic(new BasicCtrl(),new BasicSkin());
					Global.basic = result;
					break;
			}
			return result;
		}
	}
}